https://glot.io/snippets/gbme7whacg/raw/main.lua